package com.yuyue.springFramework.note07.entity;

import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.annotation.Order;
import org.springframework.core.type.AnnotatedTypeMetadata;

/**
 * 定义一定通过的条件实现类，以 @Order(1) 作为排序方式
 */
@Order(2)
public class Condition1 implements Condition {
    @Override
    public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
        System.out.println("Condition1");
        return true;
    }
}
